<template>
    <m-list-construction title="超算资源使用概览">
        <template slot="content">
            <div style="padding:20px 0;">
                <el-row :gutter="20">
                    <el-col :span="6">
                        <div class="card1">
                            <div class="body text-center" style="display: flex;flex-direction: column;justify-content: center;">
                                <div style="font-size: 20px;">您好，berlin123</div>
                                <span style="color:#33317E">订单中心 ></span>
                            </div>
                        </div>
                    </el-col>
                    <el-col :span="9">
                        <div class="card1">
                            <div class="title">账户概览</div>
                            <div class="body">
                                <el-row :gutter="60">
                                    <el-col :span="8" style="border-right: 1px solid rgba(153,153,153,0.5);">
                                        <div class="">
                                            <div>可用额度(元)</div>
                                            <div class="mt10"><span class="num">2,000</span> <span>核时</span></div>
                                        </div>
                                    </el-col>
                                    <el-col :span="8" style="border-right: 1px solid rgba(153,153,153,0.5);">
                                        <div class="">
                                            <div>可用积分</div>
                                            <div class="placeholder">敬请期待</div>
                                        </div>
                                    </el-col>
                                    <el-col :span="8">
                                        <div class="">
                                            <div>优惠券（元）</div>
                                            <div class="placeholder">敬请期待</div>
                                        </div>
                                    </el-col>
                                </el-row>
                            </div>
                        </div>
                    </el-col>
                    <el-col :span="9">
                        <div class="card1">
                            <div class="title">消费总览</div>
                            <div class="body">
                                <el-row :gutter="60">
                                    <el-col :span="8" style="border-right: 1px solid rgba(153,153,153,0.5);">
                                        <div class="text-center">
                                            <div>昨日消费</div>
                                            <div class="mt10">¥ <span class="num">0</span> <span>元</span></div>
                                        </div>
                                    </el-col>
                                    <el-col :span="8" style="border-right: 1px solid rgba(153,153,153,0.5);">
                                        <div class="text-center">
                                            <div>本月消费</div>
                                            <div class="mt10">¥ <span class="num">0</span> <span>元</span></div>
                                        </div>
                                    </el-col>
                                    <el-col :span="8">
                                        <div class="text-center">
                                            <div>本年消费</div>
                                            <div class="mt10">¥ <span class="num">0</span> <span>元</span></div>
                                        </div>
                                    </el-col>
                                </el-row>
                            </div>
                        </div>
                    </el-col>
                </el-row>
                <div class="mt20">
                    <div class="card">
                        <div class="title">资源概览</div>
                        <div class="body">
                            <div class="bg-card">
                                <div class="title">超算中心</div>
                                <div class="text-center body">
                                    <div><span class="num">4</span>个</div>
                                </div>
                            </div>
                            <div class="bg-card">
                                <div class="title">超算账号</div>
                                <div class="text-center body">
                                    <div><span class="num">1</span>个</div>
                                </div>
                            </div>
                            <div class="bg-card">
                                <div class="title">队列</div>
                                <div class="text-center body">
                                    <div><span class="num">1</span>个</div>
                                </div>
                            </div>
                            <div class="bg-card">
                                <div class="title">作业</div>
                                <div class="text-center body">
                                    <div><span class="num">0</span>个</div>
                                </div>
                            </div>
                            <div class="bg-card">
                                <div class="title">存储</div>
                                <div class="text-center body">
                                    <div><span class="num">2</span>T</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="mt20">
                    <div class="search-row">
                        <div class="title">机时消费统计</div>
                        <div class="search-form">
                            <el-form inline size="small">
                                <el-form-item class="mb0" label="时间">
                                    <el-date-picker type="daterange" range-separator="至" start-placeholder="开始日期"
                                                    end-placeholder="结束日期">
                                    </el-date-picker>
                                </el-form-item>
                                <el-form-item label="超算账户">
                                    <el-select>
                                        <el-option>berlin818</el-option>
                                    </el-select>
                                </el-form-item>
                                <el-form-item><el-button type="primary">作业详情</el-button></el-form-item>
                            </el-form>
                        </div>
                    </div>
                    <div class="alert-info">当前时间段内，当前组织CPU作业合计消耗 0 核时，GPU作业合计消耗 0 卡时；合计已支付金额 0 元</div>
                </div>
                <div class="empay-card">
                    <m-no-data :height="300" msg="当前组织在该时间段内暂无消费数据"></m-no-data>
                </div>
            </div>
        </template>
    </m-list-construction>
</template>
<script>
  import mListConstruction from '@/module/components/listConstruction/listConstruction'
  import mNoData from '@/module/components/noData/noData'
  export default {
    name: 'cs-resources-index',
    data () {
      return {
        total: null,
        isLoading: true,
        item: {},
        createDialog: false
      }
    },
    props: {},
    methods: {

    },
    watch: {

    },
    beforeDestroy () {
      sessionStorage.setItem('isLeft', 1)
    },
    components: { mListConstruction, mNoData }
  }
</script>
<style lang="scss" scoped>
.card1 {
    width: 100%;
    height: 130px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    .title {
        font-size: 16px;
        font-weight: 600;
        padding: 10px;
    }
    .body {
        flex: 1;
        padding: 0 20px;
    }

    .num {
        font-size: 40px;
        font-family: Oxanium, Oxanium-Bold;
        font-weight: 700;
        line-height: 1;
    }
    .placeholder {
        font-size: 30px;
        font-family: YouSheBiaoTiHei, YouSheBiaoTiHei-Regular;
        font-weight: 400;
        color: #cccccc;
        line-height: 30px;
        text-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.1);
        margin-top: 10px;
    }
}

.card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.25);
    .title {
        padding: 10px 10px 0 10px;
        font-size: 16px;
        font-weight: 600;
    }
    .body {
        padding: 10px;
        display: flex;
        & > div + div {
            margin-left: 10px;
        }
    }
}

.bg-card {
    background: #f5f6f8;
    border-radius: 8px;
    padding: 10px;
    flex: 1;
    .title {
        font-weight: 300;
        padding: 0;
    }
    .body {
        text-align: center;
        display: flex;
        justify-content: center;
        .num {
            font-size: 40px;
            font-family: Oxanium, Oxanium-Bold;
            font-weight: 700;
        }
    }
}

.search-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    .title {
        font-size: 16px;
        font-weight: 600;
    }
}

.alert-info {
    background: rgba(51, 49, 126, 0.1);
    color: #33317e;
    font-size: 14px;
    padding: 10px;
    border-radius: 8px;
}

.empay-card {
    margin-top: 20px;
    min-height: 300px;
    height: calc(100vh - 630px);
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.25);
}
</style>
